﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/AdmMasterPage.master" AutoEventWireup="true"
    CodeFile="0202channelmaintain.aspx.cs" Inherits="admin_UC02_0202channelmaintain"
    ValidateRequest="false" %>

<%@ Register Src="../usercontrol/CKEditor_Basic.ascx" TagName="CKEditor_Basic" TagPrefix="uc1" %>
<%@ Register Src="../usercontrol/CKEditor.ascx" TagName="CKEditor" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../css/css.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td>
                <asp:LinkButton ID="btnAddNew" runat="server" CssClass="new" OnClick="btnAddNew_Click">新增子分類</asp:LinkButton>
            </td>
        </tr>
        <tr>
            <td align="left">
                <asp:Panel ID="pnlContent" runat="server">
                    <br />
                    <table cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td width="60" align="left" class="txt-12">
                                分類名稱
                            </td>
                            <td>
                                <asp:TextBox ID="txtName" runat="server" Width="400px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td width="60" align="left" class="txt-12">
                                分類說明
                            </td>
                            <td>
                                <uc2:CKEditor ID="ckbDescription" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" align="center">
                                <asp:Button ID="btnSave" runat="server" Text="確認送出" OnClick="btnSave_Click" />
                                &nbsp;&nbsp;
                                <asp:Button ID="btnCancel" runat="server" Text="取消作業" OnClick="btnCancel_Click" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="pnlGv" runat="server">
                    <table width="733" border="2" align="center" cellpadding="0" cellspacing="1" bordercolor="#EEEEEE"
                        bgcolor="#CCCCCC">
                        <tr>
                            <td height="375" bordercolor="#FFFFFF" bgcolor="#FFFFFF" valign="top">
                                <table width="715" border="0" align="center" cellpadding="0" cellspacing="1">
                                    <tr>
                                        <td bgcolor="#DDDDDD" class="txt-12-1">
                                            子分類列表
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top">
                                            <asp:GridView ID="gvResult" runat="server" BackColor="White" BorderColor="#DEDFDE"
                                                AutoGenerateColumns="false" BorderStyle="None" BorderWidth="1px" CellPadding="4"
                                                ForeColor="Black" GridLines="Vertical" CssClass="txt-12-1" Width="100%" OnRowCommand="gvResult_RowCommand">
                                                <RowStyle BackColor="#F7F7DE" />
                                                <FooterStyle BackColor="#CCCC99" />
                                                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                                                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                                                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                                                <AlternatingRowStyle BackColor="White" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="標題">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblTitle" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Left" Width="40%" />
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                   
                                                    <asp:TemplateField HeaderText="修改">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="btnModify" runat="server" ImageUrl="~/admin/images/modify.gif"
                                                                CommandArgument='<%# Eval("ChannelNo") %>' CommandName="myModify" CausesValidation="False" />
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="刪除">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="~/admin/images/delete.gif"
                                                                CommandArgument='<%# Eval("ChannelNo") %>' CommandName="myDel" CausesValidation="False"
                                                                OnClientClick="return confirm('確認刪除此分類?')" />
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                    <div align="left">
                                                        請新增分類資料。</div>
                                                </EmptyDataTemplate>
                                            </asp:GridView>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>
